import request, {jsonToURLSearchParams} from '@/utils/request';

export async function fakeAccountLogin(params) {
  // const searchParams = new URLSearchParams();
  // searchParams.append("username", params.userName);
  // searchParams.append("password", params.password);
  // searchParams.append("rememberMe", false);

  const searchParams = jsonToURLSearchParams(params);


  // 是一个mock的地址
  return request('/api/login', {
    method: 'POST',
    data: searchParams,
  });
}

export async function getFakeCaptcha(mobile) {
  return request(`/api/login/captcha?mobile=${mobile}`);
}
